Work apparatus, and method of rewriting history information thereof

ABSTRACT

A work apparatus in one aspect of the present disclosure comprises a control unit, a volatile memory and a rewritable non-volatile memory. The control unit comprises an update processing unit and a writing processing unit. The writing processing unit writes history information in the volatile memory into the non-volatile memory when the writing processing unit predicts a suspension of supply of an electric power to the control unit.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of Japanese Patent Application No. 2015-169407 filed Aug. 28, 2015 in the Japan Patent Office, the disclosure of which is incorporated herein by reference.

BACKGROUND

The present disclosure relates to rewriting of history information of a work apparatus.

JP5064958 discloses a driving tool for driving fastening tools such as nails, pins, and thumbtacks to an object. In this driving tool, a microcomputer controls the operation of the driving tool. The microcomputer counts the number of times of driving the fastening tools, and stores the count value to a non-volatile EEPROM. Specifically, the microcomputer reads out the count value from the EEPROM every time the driving of the fastening tools is performed, increments the read out count value, and writes the incremented count value into the EEPROM. The count value corresponds to history information of the driving tool.

SUMMARY

A rewritable non-volatile memory such as an EEPROM has a limited number of writing cycles (also the limited number of rewriting cycles).

A microcomputer in the above-described driving tool rewrites a count value inside the EEPROM every time a fastening tool is driven; thus, the number of writing operations on the EEPROM increases. Thereby, as the duration of use of the driving tool becomes longer, the number of writing operations may exceed the limited number. Or, a required memory capacity in the EEPROM will become large if an area to be written on the EEPROM is changed before the number of writing operations reaches the limited number.

Generally, a required length of time to write information will be long in the rewritable non-volatile memory as compared to the volatile memory. In the above-described driving tool, the microcomputer performs writing of history information on the EEPROM during a period of time in which a control process for a normal operation of the driving tool is performed. Thus, the execution of the control process may be negatively affected in the above-described driving tool; for example, one of the steps in the control process may be delayed.

It is desirable that one aspect of the present disclosure can provide a technique that is capable of reducing the number of writing operations of history information on a non-volatile memory and is also capable of reducing influence on a process for controlling an operation of a work apparatus.

A work apparatus in one aspect of the present disclosure comprises a control unit, a volatile memory, and a rewritable non-volatile memory.

The control unit operates with an electric power supplied from a power supply and performs a process for controlling an operation of the work apparatus.

The volatile memory is configured to retain information written in the volatile memory by the control unit during the operation of the control unit. The information includes at least history information related to the work apparatus.

The control unit comprises an update processing unit, and a writing processing unit. The update processing unit updates the history information in the volatile memory every time an event, for which the history information should be updated (hereinafter, referred to as an update-event), occurs. The writing processing unit writes the history information in the volatile memory into the non-volatile memory when the writing processing unit predicts a suspension of supply of the electric power to the control unit.

The suspension of supply of the electric power to the control unit may occur, for example, when the connection between the power supply and the work apparatus is interrupted (in other words, when the supply of the electric power is interrupted), or, when an output voltage of the power supply drops to the level where the control unit cannot operate.

In the work apparatus configured as described above, updating and storing of the history information at every occurrence of the update-event is accomplished by updating of the history information in the volatile memory by the update processing unit. And, if the suspension of supply of the electric power to the control unit is predicted, then the writing processing unit writes the history information stored in the volatile memory into the non-volatile memory. Thus, the latest history information will be stored in the non-volatile memory even if the control unit subsequently stops its operation.

Writing of the history information into the non-volatile memory will not be performed despite the occurrence of the update-event during the operation of the control unit; it will be performed directly before the operation of the control unit is stopped due to the suspension of supply of the electric power to the control unit. Thereby, it is possible to reduce the number of writing operations of the history information into the non-volatile memory as well as to reduce the influence on the process for controlling the operation of the work apparatus by writing operation of the history information into the non-volatile memory.

The control unit may further comprise a restoration processing unit configured to write the history information in the non-volatile memory into the volatile memory when the control unit is activated.

When the period from when the control unit is activated to when the operation of the control unit is stopped is referred to as an operational period, the work apparatus configured as described above can take over the history information in the past operational period in the updating of the history information.

The writing processing unit may be (i) configured to determine whether the history information in the volatile memory and the history information in the non-volatile memory differ from each other when the writing processing unit predicts the suspension of supply of the electric power; (ii) configured to write the history information in the volatile memory into the non-volatile memory when the writing processing unit determines that the history information in the volatile memory and the history information in the non-volatile memory differ from each other; and (iii) configured not to write the history information in the volatile memory into the non-volatile memory when the writing processing unit determines that the history information in the volatile memory and the history information in the non-volatile memory do not differ from each other.

The work apparatus configured as described above can avoid wasteful writing operations of the history information into the non-volatile memory when the history information in the volatile memory and the history information in the non-volatile memory are the same. Thus, the number of writing operations of the history information into the non-volatile memory can be reduced further.

The writing processing unit may be configured to read out the history information from each of the volatile memory and the non-volatile memory and compare those read out history information with each other.

Alternatively, the control unit may comprise a flag-setting unit configured to set a flag in the volatile memory when the update processing unit updates the history information in the volatile memory. In this case, the writing processing unit may be further configured to determine whether the history information in the volatile memory and the history information in the non-volatile memory differ from each other based on the flag.

The work apparatus configured as described above can swiftly determine whether the history information in the volatile memory and the history information in the non-volatile memory differ from each other since it is not necessary to compare the history information in the volatile memory and the history information in the non-volatile memory. Thus, the above-described determination and writing operation of the history information into the non-volatile memory can be completed definitely within the period from when the suspension of supply of the electric power is predicted to when the operation of the control unit actually stops.

The above-described work apparatus may be configured so that a power supply can be coupled thereto. In this case, the work apparatus may comprise a regulator configured to generate an operation voltage for operating the control unit from a power supply voltage supplied from the power supply coupled to the work apparatus. In this case, the control unit may be configured to operate by supply of the operation voltage. And, the writing processing unit may be configured to determine whether a value of the power supply voltage is smaller than or equal to a prescribed value, and to predict the suspension of supply of the electric power when the writing processing unit determines that the value of the power supply voltage is smaller than or equal to the prescribed value. The prescribed value may be greater than a minimum voltage value capable of operating the control unit.

The work apparatus configured as described above can easily predict the suspension of supply of the electric power based on the power supply voltage.

The above-described work apparatus may further comprise a power-supply line configured to input the power supply voltage into the regulator, and a capacitor provided on the power supply line and configured to be charged by the power supply voltage.

The work apparatus configured as described above can elongate a period of time, which is from when the writing processing unit determines that the value of the power supply voltage becomes smaller than or equal to the prescribed value to when the value of the power supply voltage becomes less than the minimum value and the control unit stops its operation (hereinafter referred to as a duration of operation), by an electric discharge from the capacitor. Thus, writing operation of the update information into the non-volatile memory can be definitely completed.

The control unit may further comprise a power-consumption reducing unit configured to reduce an electric power consumed via the power-supply line when the writing processing unit writes the history information in the volatile memory into the non-volatile memory.

The work apparatus configured as described above can reduce the electric discharge from the capacitor when writing operation of the history information into the non-volatile memory is performed, and thus can further elongate the duration of operation of the control unit. Consequently, the definite completion of writing operation of the history information into the non-volatile memory can be easily achieved. For example, an electrostatic capacitance of the capacitor can be set small.

The work apparatus in the present disclosure may be configured to drive the fastening tool into an object. In this case, the history information may include a count value that corresponds to driving operations of the fastening tool performed by the work apparatus. The work apparatus configured as such can determine whether a time for maintenance of the work apparatus has arrived, or can notify a user of the work apparatus that the time for maintenance has arrived, based on the history information. As a result, convenience of the work apparatus can be improved.

Another aspect of the present disclosure is a method of rewriting history information of a work apparatus, the work apparatus comprising a control unit, a volatile memory, and a rewritable non-volatile memory, and

the method comprising:

reading out the history information from the non-volatile memory when the control unit is supplied with an electric power;

writing the history information read out from the non-volatile memory into the volatile memory;

updating the history information in the volatile memory every time an event, for which the history information should be updated, occurs while the control unit is supplied with the electric power and the control unit is in operation; and

writing the history information in the volatile memory into the non-volatile memory when a suspension of supply of the electric power to the control unit is predicted.

The method as described above can reduce the number of writing operations of the history information into the non-volatile memory, and also can reduce the influence on the process for controlling the operation of the work apparatus.

BRIEF DESCRIPTION OF THE DRAWINGS

Example embodiments of the present disclosure will be described hereinafter by way of example with reference to the accompanying drawings, in which:

FIG. 1 is a side view of a gas nailer in a first embodiment;

FIG. 2 is a circuit diagram of the gas nailer;

FIG. 3A is a flow chart representing a part of a process performed by a control unit in the first embodiment;

FIG. 3B is a flow chart representing the rest of the process performed by the control unit;

FIG. 4 is a circuit diagram of a gas nailer in a second embodiment; and,

FIG. 5 is a flow chart representing additional process performed by a control unit in the second embodiment.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Example embodiments described hereinafter illustrate a gas combustion type nail driving machine (hereinafter, referred to as a gas nailer) as one example of the work apparatus.

First Embodiment

<Overall Configuration of Gas Nailer >

As illustrated in FIG. 1, a gas nailer 1 according to the first embodiment comprises a housing 3, a magazine 4, a handle 5, a contact-arm 6, a trigger 7, a head-cap 8, and a fuel-gas-canister mount 9. Note that, in the explanation hereinafter, a direction as viewed from the housing 3 toward a front-edge side (toward the contact-arm 6) in the gas nailer 1 (the left direction of FIG. 1) is defined as the front; and, a direction as viewed from the housing 3 toward a tail-edge side (toward the head-cap 8) in the gas nailer 1 (the right direction of FIG. 1) is defined as the rear. Also, a direction as viewed from the housing 3 toward the handle 5 (the downward direction of FIG. 1) is defined as the lower direction; and, a direction as viewed from the housing 3 toward the direction opposing to the handle 5 (the upward direction of FIG. 1) is defined as the upper direction.

A fuel gas canister (not shown) filled with a fuel gas such as a combustible liquefied gas is detachably mounted inside the fuel-gas-canister mount 9 that is disposed below the housing 3. A cap 10 for a gas canister is disposed at the rear side of the fuel-gas-canister mount 9. The fuel-gas-canister mount 9 opens to the rear side as this cap 10 for a gas canister is opened. The fuel gas canister is mounted by being inserted from this opening.

The magazine 4 is attached to the front side of the housing 3. The magazine 4 houses nails as a plurality of adjacent fastening tools, and guides a nail, which is to be driven, to an injection unit 12.

A battery 11 is detachably attached to the lower edge side of the handle 5. The battery 11 includes rechargeable batteries, such as nickel-hydrogen rechargeable batteries and lithium ion rechargeable batteries that are repeatedly chargeable. An electric power required for operation and control of the gas nailer 1 is supplied from the battery 11. The battery 11 corresponds to one example of a power supply.

When driving a nail to a workpiece W, an object to drive the nail, a user of the gas nailer 1 holds the handle 5 and places the contact-arm 6 firmly against the workpiece W, and, while keeping this state, pulls the trigger 7. A fuel gas then explodes inside the housing 3. Using the pressure generated by this explosion as a drive source, the nail is injected from the injection unit 12 and is driven into the workpiece W.

As the contact-arm 6 is placed firmly against the workpiece W, the contact-arm 6 moves toward the rear against a biasing force of a spring (not shown), and a combustion chamber for exploding the fuel gas is formed inside the housing 3. The fuel gas from the fuel gas canister is supplied to this combustion chamber.

The housing 3 comprises there inside, a fan 13 for mixing the fuel gas inside the combustion chamber with air; a motor 14 that rotates the fan 13; and an ignition plug 15 for igniting the fuel gas supplied inside the combustion chamber and for exploding the fuel gas.

Also a main body of the gas nailer 1 comprises there inside, a contact-arm switch 21 (see, FIG. 2), which is turned on when the contact-arm 6 is placed firmly against the workpiece W and moves to the rear (in other words, when the combustion chamber is formed). Further, the main body of the gas nailer 1 also comprises there inside a trigger switch 23 (see, FIG. 2) that is turned on when the trigger 7 is pulled.

The magazine 4 also houses a control circuit 17 that controls operation of the gas nailer 1, in addition to a plurality of the nails as mentioned above.

The control circuit 17 operates with an electric power supplied from the battery 11, and comprises a substrate having circuits thereon for performing various controls. And, an LED 19 is disposed on the substrate of the control circuit 17. The LED 19 is an indicator light for notifying the user of, for example, remaining amount of the charged power in the battery 11 (hereinafter referred to as remaining energy of the battery), and is provided visible from outside of the gas nailer 1.

<Configuration of Control Circuit >

As illustrated in FIG. 2, the control circuit 17 comprises the aforementioned LED 19, a control unit 31, a regulator 32, a power-supply-voltage detecting circuit 33, a motor drive circuit 34, an ignition circuit 35, a power-supply positive terminal 36, and a power-supply negative terminal 37.

The battery 11 is coupled to the control circuit 17 when the battery 11 is attached to the gas nailer 1. Specifically, a positive terminal of the battery 11 is coupled to the power-supply positive terminal 36 of the control circuit 17, and a negative terminal of the battery 11 is coupled to the power-supply negative terminal 37 of the control circuit 17. The battery 11 being coupled to the control circuit 17 as described above corresponds to the battery 11 being coupled to the gas nailer 1.

A power supply voltage VD of direct current, which is generated by the battery 11 being coupled to the gas nailer 1, is inputted to the regulator 32. Since the battery 11 is the direct current power supply in the first embodiment, an output voltage of the battery 11 is the power supply voltage VD. Thus, the output voltage of the battery 11 (for example, normally at 7.2V) is inputted to the regulator 32 as the power supply voltage VD via a power-supply line 38 that is conducted to the power-supply positive terminal 36.

The regulator 32 is a power-supply circuit that generates, from the inputted power supply voltage VD, a constant voltage Vcc (for example, 5V) that is lower than the inputted power supply voltage VD, and outputs the constant voltage Vcc. The constant voltage Vcc from the regulator 32 is supplied to the control unit 31 as an operation voltage. Although its illustration is omitted, the constant voltage Vcc is also supplied, for example, to the LED 19 as a power-supply for lighting. Note that it may also be configured so that the power supply voltage VD is supplied to the LED 19 as the power-supply for lighting,

The control unit 31 operates with the constant voltage Vcc supplied from the regulator 32. Since the electric power consumed by an electric load connecting to a line of the constant voltage Vcc (that is, output power of the regulator 32) is the electric power supplied from the battery 11, the control unit 31 operates with the electric power supplied from the battery 11 as an electric power for operation.

On the control circuit 17, a capacitor C1 is coupled between the power-supply line 38 and a ground line 39 that is conducted to the power-supply negative terminal 37. And, a capacitor C2 is coupled between the line of the constant voltage Vcc and the ground line 39. The capacitor C1 is charged by the power supply voltage VD; and, the capacitor C2 is charged by the constant voltage Vcc. Therefore, even if the battery 11 is removed from the gas nailer 1 (in other words, if the power supply is interrupted) during the operation of the control unit 31, the control unit 31 can still keep operating at least for a specified minimal time by the electric power accumulated in the capacitors C1, C2.

The control unit 31 in this first embodiment is realized by a microcomputer and comprises a CPU 41, a non-volatile ROM 42 storing a program executed by the CPU 41, a volatile RAM 43, an A/D convertor (ADC) 44, and, a rewritable non-volatile flash ROM 45. Note that the flash ROM is also called a flash memory.

The control unit 31 performs a process to control the operation of the gas nailer 1. The operation of the control unit 31 is realized by the CPU 41 executing the program in the ROM 42. The power supply of the RAM 43 for retaining data is the constant voltage Vcc which is for the control unit 31 to operate; thus, the RAM 43 retains written information during the operation of the control unit 31.

And, the control unit 31 counts the number of operations of the ignition circuit 35 in order to determine an arrival of the time for maintenance of the gas nailer 1. This number to be counted is equal to the number of nail-driving operations that the gas nailer 1 drives the nails, if the gas nailer 1 is operating normally. A count value that corresponds to the number of nail-driving operations (hereinafter, referred to as a driving count value) is stored in the RAM 43. The driving count value corresponds to one example of the history information, and represents the number of nail-driving operations in this first embodiment. The RAM 43 corresponds to one example of the volatile memory.

In addition, the control unit 31 writes the driving count value in the RAM 43 into the flash ROM 45 to thereby store the driving count value in the flash ROM 45 right before the control unit 31 stops its operation in association with an interruption of the power supply to the gas nailer 1 (removal of the battery 11 in the present example) or with a decrease of the power supply voltage VD. The flash ROM 45 corresponds to one example of a rewritable non-volatile memory

The power-supply-voltage detecting circuit 33 is a circuit for detecting a value of the power supply voltage VD; for example, it divides the power supply voltage VD at a specified dividing ratio and outputs the divided voltage to the control unit 31 as a voltage detecting signal. The control unit 31 can detect the value of the power supply voltage VD by A/D converting this voltage detecting signal. Note that outputs from the power-supply-voltage detecting circuit 33 to the control unit 31 are made via a low-pass filter that removes high-frequency noise. A time constant of this low-pass filter is set to be smaller than a time constant of a change of the power supply voltage VD and to be greater than a time constant of a high-frequency noise to be removed. Thereby, the change of the power supply voltage VD can be detected without fail as false operations are reduced by removing the high-frequency noise.

Signals from each of the contact-arm switch 21 and the trigger switch 23 are also inputted to the control unit 31. It enables the control unit 31 to be aware of an ON/OFF state of the contact-arm switch 21 based on a signal from the contact-arm switch 21 and of the ON/OFF state of the trigger switch 23 based on a signal from the trigger switch 23.

In the control circuit 17, light-On/Off switching of the LED 19 and the colors of the lighting are controlled by the control unit 31.

The motor drive circuit 34 is a circuit that drives the motor 14 in accordance with a control signal from the control unit 31. In this first embodiment, the motor 14 is a direct current motor; one terminal of this motor 14 is coupled to the power-supply line 38. The motor drive circuit 34 drives the motor 14 by making the current path between the other terminal of the motor 14 and the ground line 39 conductive. And, the motor drive circuit 34 stops the motor 14 by interrupting the aforementioned current path. Note that the motor drive circuit 34 in this example is a low-side driving circuit that is disposed downstream of the motor 14; nevertheless, the motor drive circuit 34 may also be a high-side driving circuit that is disposed upstream of the motor 14.

The ignition circuit 35 supplies the ignition plug 15 with high voltage for ignition in accordance with the control signal from the control unit 31. The electric power for the ignition circuit 35 to generate the high voltage is also supplied from the battery 11 via the power-supply line 38.

<Basic Operation of Gas Nailer >

As the user of the gas nailer 1 holds the handle 5, places a tip of the contact-arm 6 firmly against the workpiece W, and moves the contact-arm 6 from its initial position to the rear, an enclosed combustion chamber is formed inside the housing 3 and, at the same time, fuel gas from the fuel gas canister is supplied into the combustion chamber. Note that the initial position of the contact-arm 6 is where it is positioned in the state illustrated in FIG. 1.

The contact-arm switch 21 is turned on when the contact-arm 6 is moved from its initial position to the rear. The control unit 31 rotates the fan 13 by driving the motor 14 via the motor drive circuit 34 when it detects that the contact-arm switch 21 is turned on. The fuel gas is mixed and stirred with air inside the combustion chamber as a consequence of the rotation of the fan 13.

Then the trigger switch 23 is turned on when the user pulls the trigger 7. The control unit 31 supplies the ignition plug 15 with high voltage for ignition via the ignition circuit 35 when it detects that the trigger switch 23 is turned on.

The ignition plug 15 then sparks and the fuel gas inside the combustion chamber explodes. With this explosive power, the nail is injected from the injection unit 12 of the gas nailer 1. This injected nail is then driven into the workpiece W.

As the user stops pulling the trigger 7 and takes the contact-arm 6 away from the workpiece W after driving the nail, the contact-arm 6 moves back to its initial position and the contact-arm switch 21 is turned off. The control unit 31 does not immediately stop driving the motor 14 when it detects that the contact-arm switch 21 is turned off; it continues to drive the motor 14 until a predetermined set time (for example, 7 seconds) elapses. During the set time, operations such as discharging of exhaust gases inside the combustion chamber, and cooling of the combustion chamber and its surrounding components inside the gas nailer 1 are performed.

<Contents of Process>

Process performed by the control unit 31 will be explained next with reference to FIG. 3A and FIG. 3B.

As the battery 11 is mounted to the gas nailer 1 that is in a state of having no battery 11, an output of the constant voltage Vcc from the regulator 32 is started and the control unit 31 is activated in the gas nailer 1. Note that the regulator 32 also comprises a so-called power-on-reset function which resets the control unit 31 for a certain period of time when the output of the constant voltage Vcc begins.

The control unit 31 starts the process illustrated in FIG. 3A and FIG. 3B when activated.

The control unit 31 first performs an initialization processing for initializing the control unit 31 in S110, and then performs a count value read-out processing in the next S120. In this count value read-out processing, the control unit 31 reads out the aforementioned driving count value from the flash ROM 45, and writes the read out driving count value into the RAM 43. In other words, the control unit 31 copies the driving count value in the flash ROM 45 to the RAM 43.

The control unit 31 repeats the processings in and after S140 in a specified control cycle after completing the count value read-out processing in S120.

Specifically, the control unit 31 waits for a time base, which is a certain period of time equivalent of the control cycle, to elapse by determining whether the time base has elapsed in S130 that follows S120. And the process proceeds to S140 when the control unit 31 determines that the time base has elapsed in S130.

In S140, the control unit 31 performs a switching-state detecting processing for detecting the ON/OFF state of each of the contact-arm switch 21 and the trigger switch 23 by confirming signals inputted from these switches.

In the next S150, the control unit 31 performs an A/D conversion processing for A/D converting and obtaining the voltage detecting signal from the power-supply-voltage detecting circuit 33, and also calculates the value of the power supply voltage VD from the A/D converted value of the voltage detecting signal.

In the next S160, the control unit 31 determines whether a motor operational condition is satisfied. The motor operational condition is a condition to operate the motor 14. It is determined that this motor operational condition is satisfied during the time that the contact-arm switch 21 is on, and during the time until the aforementioned set time elapses since when the contact-arm switch 21 is turned to off from on.

If it is determined that the motor operational condition is satisfied in S160, then the process proceeds to S170 to drive the motor 14, and proceeds to S190. If it is determined that the motor operational condition is not satisfied in S160, then the process proceeds to S180 to stop the motor 14, and proceeds to S190.

In S190, the control unit 31 determines whether a drive operation for driving the nails has been performed. Specifically, the control unit 31 determines that the drive operation has been performed if the contact-arm switch 21 is on and if the trigger switch 23 is turned on from off.

If it is determined in S190 that the drive operation has been performed, then the process proceeds to S200.

In S200, the control unit 31 ignites the ignition plug 15 via the ignition circuit 35. As a consequence, the nail is injected from the injection unit 12 and is driven into the workpiece W as described above.

In the next S210, the control unit 31 increments the driving count value in the RAM 43. In other words, the control unit 31 increases the driving count value by one.

In the next S220, the control unit 31 sets an update flag in the RAM 43; the process then proceeds to S230. The update flag is a flag to indicate that the driving count value in the RAM 43 is updated. The update flag is reset in the initialization processing in S110.

If it is determined in the aforementioned S190 that the drive operation has not been performed, then the process proceeds straight to S230.

In S230, the control unit 31 determines whether a count-value reset operation for clearing the driving count value to zero has been performed. The count-value reset operation is an operation performed when the user carries out a maintenance on the gas nailer 1, for example, a specific sequential operation that might not be performed in the normal operation of the gas nailer 1. A possible specific sequential operation may be, for example, placing the contact-arm 6 firmly for a given number of times in a state where the trigger 7 is not pulled, maintaining the state of placing the contact-arm 6 firmly for a given period of time, and then placing the contact-arm 6 firmly again for the given number of times.

If it is determined in S230 that the count-value reset operation has been performed, then the process proceeds to S240 to clear the driving count value in the RAM 43 to zero. The process proceeds to the next S250 to set the aforementioned update flag, and then proceeds to S260.

If it is determined in the aforementioned S230 that the count-value reset operation has not been performed, then the process proceeds straight to S260.

In S260, the control unit 31 determines whether the value of the power supply voltage VD is smaller than or equal to a prescribed value Vth. This prescribed value Vth is a value smaller than a normal value of the power supply voltage VD but greater than a minimum voltage value capable of operating the control unit 31, for example, 5.5V.

If the control unit 31 makes a positive determination in S260 (in other words, it determined that the value of the power supply voltage VD is smaller than or equal to the prescribed value), then the control unit 31 predicts that the supply of the electric power for operation to the control unit 31 will be stopped soon. And, the process proceeds to S270.

In S270, the control unit 31 determines whether the driving count value in the RAM 43 has changed from a value at the time of activation. The value at the time of activation refers to the driving count value that is read out from the flash ROM 45 and copied to the RAM 43 in S120, which is immediately after the control unit 31 is activated. In other words, it is determined in S270 whether the driving count value in the RAM 43 and the driving count value in the flash ROM 45 differ from each other.

In a practical sense, it is determined in S270 that the driving count value in the RAM 43 has changed from the value at the time of activation if the aforementioned update flag is set by referring to the update flag. Adversely, if the update flag is not set, then it is determined that the driving count value in the RAM 43 has not changed from the value at the time of activation (in other words, that the driving count value in the RAM 43 and the driving count value in the flash ROM 45 are the same).

If it is determined in S270 that the driving count value in the RAM 43 has changed from the value at the time of activation, then the process proceeds to S280 to perform a power consumption reduction processing for reducing the electric power consumed via the power-supply line 38. The power consumption reduction processing may be any processings that reduce the consumed electric power on an electric load that consumes the electric power from the power-supply line 38, for example, a processing to turn off the LED 19 and a processing to stop the drive of the motor 14 in the present first embodiment. Such a processing may also be a processing that reduces the consumed electric power on the control unit 31 by, for example, stopping a part of the functions in the control unit 31, interrupting electric feed to some parts in the control unit 31, or by lessening frequency of a clock inside the control unit 31.

The control unit 31 performs a writing processing for writing the driving count value in the RAM 43 to the flash ROM 45 in S290 after completing the power consumption reduction processing in S280. This writing processing deletes data in a storage area, which is designated as a storage designation for the driving count value among the storage areas in the flash ROM 45, and writes the driving count value read out from the RAM 43 into this storage area after the deletion of the data.

The control unit 31 then resets the update flag in the next S300; and the process proceeds to S310.

The process proceeds straight to S310 if it is determined in S270 that the driving count value in the RAM 43 has not changed from the value at the time of activation, or if it is determined in S260 that the value of the power supply voltage VD is not smaller than or equal to the prescribed value.

In S310, a displaying processing for controlling the LED 19 is performed.

For example, the control unit 31 calculates a remaining energy of the battery based on the value of the power supply voltage VD, and makes the LED 19 blink in red if it is determined that the remaining energy of the battery is smaller than or equal to a prescribed amount. If it is determined that the remaining energy of the battery has decreased to such an extent that the normal operation of the gas nailer 1 cannot be performed, the control unit 31 lights the LED 19 in red. The control unit 31, for example, determines whether the driving count value in the RAM 43 is greater than or equal to a determination value at which it is considered that the gas nailer 1 should undergo a maintenance. And if the driving count value is greater than or equal to the determination value, then the control unit 31 determines that the time for maintenance has arrived. The determination value for the driving count value may be a preset value, or a value set by the user. When it is determined that the time for maintenance has arrived, the control unit 31 notifies the user that the time for maintenance has arrived by making the LED 19 blink, for example, in green. The user then carries out the maintenance such as replacing or cleaning of the ignition plug 15 and other parts when the LED 19 blinks in green, and then carries out the aforementioned count-value reset operation.

The process returns to S130 when the control unit 31 has completed the displaying processing in S310.

Note that an electrostatic capacitance of the capacitors C1, C2 (particularly, of C1) are set large enough to continue the operation of the control unit 31 at least until the control unit 31 completes the writing processing in S290 after making the positive determination in S260 when the battery 11 is removed from the gas nailer 1. In other words, the aforementioned minimal time is longer than the maximum time for the control unit 31 to complete the writing processing after the battery 11 is removed.

Operation and Effect by First Embodiment

The control unit 31 of the gas nailer 1 updates the driving count value in the RAM 43 every time an update-event, for which the driving count value should be updated, occurs during the operation.

There are two types of the update-events in the present first embodiment. One is a drive-execution event that the nail has been driven (specifically, that the ignition plug 15 has been ignited). The other update-event is a reset event that the count-value reset operation has been performed by the user. The control unit 31 performs a processing in S210 in FIG. 3B (that is, a processing to increment the driving count value in the RAM 43) as a processing to update the driving count value when the drive-execution event occurs. The control unit 31 performs a processing in S240 in FIG. 3B (that is, a processing to clear the driving count value in the RAM 43) as a processing to update the driving count value when the reset event occurs.

Meanwhile, if the value of the power supply voltage VD becomes smaller than or equal to the prescribed value Vth as a result of a removal of the battery 11 from the gas nailer 1 or as a result of a decrease in the power supply voltage VD due to a decrease in the remaining energy of the battery during the operation of the control unit 31, then the control unit 31 makes the positive determination in S260 in FIG. 3B.

After making the positive determination in S260 in FIG. 3B, the control unit 31 predicts a suspension of supply of the electric power for operation to the control unit 31. In other words, the control unit 31 determines that supply of the electric power for operation will soon be suspended and the operation of the control unit 31 will stop. And the control unit 31 performs the writing processing in S290 in FIG. 3B to write the driving count value in the RAM 43 into the flash ROM 45 when it predicts the suspension of supply of the electric power for operation.

Note that, even if the battery 11 is removed, the control unit 31 still can continue its operation by the accumulated electric power in the capacitors C1, C2 as mentioned above until at least the writing processing is completed. If the motor 14 is in a free run state when the battery 11 is removed, then the control unit 31 can continue to operate longer since the falling of the power supply voltage VD becomes gradual due to an induced voltage of the motor 14. And, even if the motor 14 is being driven when the battery 11 is removed, the control unit 31 stops the drive of the motor 14 by the power consumption reduction processing in S280 in FIG. 3B. This brings the motor 14 into the free run state, and thus the falling of the power supply voltage VD becomes gradual.

In the gas nailer 1 according to the first embodiment, the updating and storing of the driving count value at every occurrence of the update-event are performed by updating the driving count value in the RAM 43. The control unit 31 writes the driving count value stored in the RAM 43 into the flash ROM 45 when the supply of the electric power for operation is about to be suspended. Therefore, the latest driving count value is stored in the flash ROM 45 even if the control unit 31 stops its operation afterwards.

Writing operation of the driving count value into the flash ROM 45 is not performed when an update-event occurs during the operation of the control unit 31. It will be performed right before the control unit 31 stops its operation due to the suspension of supply of the electric power for operation. Thereby, the number of writing operations of the driving count value into the flash ROM 45 can be reduced, and at the same time, the process for controlling the operation of the gas nailer 1 can be kept from being affected by writing operation of the driving count value into the flash ROM 45.

The control unit 31 writes the driving count value in the flash ROM 45 into the RAM 43 in S120 in FIG. 3A right after the activation, and afterwards during its operation, the control unit 31 updates the driving count value in the RAM 43 every time the update-event occurs.

Thereby, the control unit 31 can take over the driving count value from the past operational periods with respect to the updating of the driving count value.

The control unit 31 determines in S270 in FIG. 3B whether the driving count value in the RAM 43 and the driving count value in the flash ROM 45 differ from each other when it predicts the suspension of supply of the electric power for operation. If the control unit 31 makes the positive determination in S270, then it performs the writing processing in S290 in FIG. 3B; however, if the control unit 31 makes the negative determination in S270, it does not perform the writing processing.

Thereby, unnecessary writing processing can be avoided when the driving count value in the RAM 43 and the driving count value in the flash ROM 45 are the same. Therefore, the number of writing operations of the driving count value into the flash ROM 45 can be reduced further.

The control unit 31 sets the update flag in the RAM 43 in S220 or

S250 in FIG. 3B every time it updates the driving count value in the RAM 43 in S210 or S240 in FIG. 3B. The control unit 31 then determines in S270 in FIG. 3B whether the driving count value in the RAM 43 and the driving count value in the flash ROM 45 differ from each other based on whether the update flag is set.

Thereby, the control unit 31 can swiftly complete the determination in

S270 in FIG. 3B; and therefore, the control unit 31 can definitely complete the processings at least from S270 to S290 during a period from when the control unit 31 makes the positive determination in S260 in FIG. 3B to when it stops its operation.

Meanwhile, the control unit 31 may be configured to read out the driving count value from each of the RAM 43 and the flash ROM 45 in S270 in FIG. 3B and compare those read out driving count values with each other. However, compared to the aforementioned configuration, the determination in S270 can be completed swiftly when the update flag is used.

The control unit 31 also determines in S260 in FIG. 3B whether the value of the power supply voltage VD, which is inputted into the regulator 32, is smaller than or equal to the prescribed value Vth. And, the control unit 31 predicts the suspension of supply of the electric power for operation if it determines that the value of the power supply voltage VD is smaller than or equal to the prescribed value Vth.

Thereby, the control unit 31 can easily predict the suspension of supply of the electric power for operation based on the power supply voltage VD.

For example, if a specified fore-notice signal is intended to be given to the control unit 31 before the suspension of the power supply voltage VD, then the control unit 31 can be configured to predict the suspension of supply of the electric power for operation when the fore-notice signal is inputted. However, if the control unit 31 does perform the determination in S260 in FIG. 3B, then it is not necessary to dispose a circuit for generating the fore-notice signal and give the signal to the control unit 31.

Additionally, the capacitor C1 is disposed on the power-supply line 38, which is for inputting the power supply voltage VD to the regulator 32.

The electric discharge from the capacitor C1 can thus elongate the duration of operation, which is from when the control unit 31 makes the positive determination in S260 in FIG. 3B to when the control unit 31 stops its operation due to the value of the power supply voltage VD being less than the minimum value. As a consequence, the writing processing for writing the driving count value into the flash ROM 45 can be completed definitely.

The control unit 31 performs the power consumption reduction processing in S280 in FIG. 3B when it performs the writing processing; thus, the electric discharge from the capacitor C1 can be reduced. Therefore, the duration of operation of the control unit 31 can be elongated further; and consequently, a definite completion of the writing processing can be achieved easily. For example, the electrostatic capacitance of the capacitor C1 can be set smaller. And, the electrostatic capacitance of the capacitor C2 can also be set smaller.

Note that, although S300 in FIG. 3B can be eliminated, it is included due to the following reasons.

Suppose the control unit 31 continues its operation as the power supply voltage VD rises after the writing processing is performed in S290 followed by the positive determination in S260, not as a result of a removal of the battery 11, but as a result of a temporary drop of the power supply voltage VD. And, suppose the positive determination is then made again in S260 without an update of the driving count value in the RAM 43.

In this supposition, the positive determination will be made in S270 and the writing processing will be performed again in S290 if there is no S300 and thus no reset of the update flag. And, the same value as in the previous round will be written into the flash ROM 45 in the writing processing in this subsequent round. In other words, the writing processing in this subsequent round will be futile. Meanwhile, if the update flag is cleared in S300 in the aforementioned supposition, then the negative determination will be made in S270 and such futile writing processing will be avoided.

In the first embodiment, the control unit 31 corresponds to one example of the control unit. The control unit 31 also functions as each of the update processing unit, the writing processing unit, the restoration processing unit, the flag-setting unit, and the power-consumption reducing unit. Among the processings illustrated in FIG. 3A and FIG. 3B, those processings in S210 and S240 correspond to one example of the processing performed by the update processing unit. Those processings in S260, S270, and S290 correspond to one example of the processing performed by the writing processing unit. The processing in S270 corresponds to one example of the determining processing. The processing in S120 corresponds to one example of the processing performed by the restoration processing unit. Those processings in S220 and S250 correspond to one example of the processing performed by the flag-setting unit. And, the processing in S280 corresponds to one example of the processing performed by the power-consumption reducing unit.

Second Embodiment

A gas nailer in the second embodiment will be explained next. The reference numeral for the gas nailer is “1”, likewise in the first embodiment. The same reference numerals as the first embodiment will also be used for the components and processings similar to those of the first embodiment.

The gas nailer 1 in the second embodiment differs from the gas nailer 1 in the first embodiment in the following (1) to (4).

(1) As illustrated in FIG. 4, the gas nailer 1 in the second embodiment comprises a power-supply switch 46. The power-supply switch 46 is, for example, a push-type switch that turns on only while it is pushed.

(2) As illustrated in FIG. 4, the gas nailer 1 in the second embodiment comprises a control circuit 47 in place of the control circuit 17. The control circuit 47 comprises a switching circuit 49 for switching connection and disconnection between the power-supply positive terminal 36 and the power-supply line 38.

The switching circuit 49 is in an on state, which is for connecting the power-supply positive terminal 36 and the power-supply line 38, while the power-supply switch 46 is turned on by the user or while a power-supply retaining signal SH that is inputted from the control unit 31 is in an active level. Conversely, the switching circuit 49 is in an off state, which is for disconnecting the power-supply positive terminal 36 and the power-supply line 38, when the power-supply switch 46 is not turned on and the power-supply retaining signal SH that is inputted from the control unit 31 is in an inactive level.

(3) The control unit 31 turns the power-supply retaining signal SH to the switching circuit 49 into the active level right after its activation. For example, the control unit 31 performs a processing to turn the power-supply retaining signal SH into the active level as the first processing within the initialization processing in S110 in FIG. 3A. The active level of the power-supply retaining signal SH is, for example, at high level.

(4) The control unit 31 performs the processing of FIG. 5 in parallel with the processing of FIG. 3A and FIG. 3B, for example, at every fixed time.

The control unit 31 determines whether a predetermined operation-stop condition is satisfied in S410 once the processing in FIG. 5 is started. The operation-stop condition is a condition to allow the control unit 31 to stop its operation, for example, a condition that the operation by the user on the gas nailer 1 is not detected for a certain period of time or longer.

If is the control unit 31 determines that the operation-stop condition is not satisfied, then the control unit 31 directly finishes the processing in FIG. 5; however, if the control unit 31 determines that the operation-stop condition is satisfied, then the process proceeds to S420. The control unit 31 does not perform the processing in FIG. 3A and FIG. 3B after it is determined that the operation-stop condition is satisfied.

In S420, the control unit 31 performs the same determining processing as in S270 in FIG. 3B. And, if the positive determination is made in the determining processing in S420, in other words, if the driving count value in the RAM 43 and the driving count value in the flash ROM 45 differ from each other, then the process proceeds to S430.

In S430, the same writing processing as in S290 in FIG. 3B is performed; then the process proceeds to S440 and changes the power-supply retaining signal SH from the active level to the inactive level.

If the negative determination is made in the determining processing in S420, in other words, if the driving count value in the RAM 43 and the driving count value in the flash ROM 45 are the same with each other, then the process directly proceeds to S440 and changes the power-supply retaining signal SH from the active level to the inactive level.

In such a gas nailer 1 in the second embodiment, as the user turns on the power-supply switch 46, the switching circuit 49 turns to be in the on state, the power supply voltage VD is supplied to the power-supply line 38, and the control unit 31 is activated. Since the power-supply retaining signal SH to the switching circuit 49 turns to be in the active level when the control unit 31 is activated, the switching circuit 49 stays to be in the on state when the power-supply switch 46 is turned off.

Subsequently, if the control unit 31 determines that the operation-stop condition is satisfied, then the same determining processing as in S270 in FIG. 3B is performed in S420 in FIG. 5. And, if the positive determination is made in this determining processing, then the same writing processing as in S290 in FIG. 3B is performed in S430 in FIG. 5. If this writing processing is completed, then the power-supply retaining signal SH is turned to be in the inactive level in S440 in FIG. 5. Consequently, the switching circuit 49 is turned to be in the off state, which causes the control unit 31 to stop its operation.

In this second embodiment, the control unit 31 turns the switching circuit 49 to be in the off state and stops the supply of the electric power for operation to the control unit 31 if it determines that the operation-stop condition is satisfied. The operation-stop condition is also a condition for stopping the supply of the electric power for operation to the control unit 31.

Thus, the control unit 31 predicts the suspension of supply of the electric power for operation if it determines that the operation-stop condition is satisfied. And, in such a case, the control unit 31 writes the driving count value in the RAM 43 into the flash ROM 45 if the driving count value in the RAM 43 and the driving count value in the flash ROM 45 differ from each other.

Similar effects as those obtained by the gas nailer 1 in the first embodiment can also be obtained by the gas nailer 1 in the second embodiment as mentioned above.

Note that the processings from S410 to S430 correspond to one example of the processings performed by the writing processing unit; and the processing in S420 corresponds to one example of the determining processing.

Other Embodiments

The power supply of the gas nailer 1 may be an alternating current power supply. In such a case, the connection between the gas nailer 1 and the power supply is established via a power-supply cable. The electric power is supplied to the gas nailer 1, for example, by a plug at the end of the power-supply cable that extends from the gas nailer 1 being inserted to an outlet of the alternating current power supply. Furthermore in this case, the gas nailer 1 comprises a rectifier for converting the alternating current into the direct current. The direct current voltage outputted from the rectifier, or, the voltage smoothed in a smoothing circuit will be supplied to the power-supply line 38 as the power supply voltage VD.

In addition, the rewritable non-volatile memory does not have to be limited to the flash ROM 45 and may be other types of non-volatile memory such as an EEPROM. The rewritable non-volatile memory may be set up outside the control unit 31.

The work apparatus may be any apparatus as long as it is used for works on a work site, for example, a power tool such as a drill, an impact driver, a circular saw, and a grinder, or a mowing machine, or a blower.

The history information may be any information as long as it is related to the work apparatus, for example, detected results of troubles, trouble information that indicates the details of troubles, mode information that indicates the operation mode selected by the user, a displayed content on a display unit, a driving state of the LED or a lamp, a maximum value of electric current that flowed through the electric load mounted on the work apparatus, or a dispersion range of the power supply voltage.

In addition, it is not limited that the driving count value should be increased by 1 every time the nail is driven; it may be increased by, for example, an integer greater than 1.

And, S270 in FIG. 3B and S420 in FIG. 5 may be eliminated.

The example embodiments of the present disclosure are explained hereinbefore; nevertheless, the present disclosure may adopt various modes without being limited to the aforementioned embodiment. The aforementioned values are also only some examples, and thus other values may be used.

For example, although the control unit 31 is realized by a microcomputer in the aforementioned embodiment, the control unit 31 may be realized, in place of the microcomputer, by any combination of various types of separate electronic components, or by an ASIC (Application Specified Integrated Circuit), or by a programmable logic device such as an FPGA (Field Programmable Gate Array), or by any combination thereof.

Furthermore, functions possessed by one component in the aforementioned embodiments may be dispersed as a plurality of components, or, functions possessed by a plurality of components may be integrated into one component. Alternatively, a part of the configurations of the aforementioned embodiments may be omitted. Or, at least a part of the configurations of the aforementioned embodiments may be added to or used in place of other configurations of the aforementioned embodiments. Note that the embodiments of the present disclosure encompasses any modes included in the technical ideas that are identified by recitation written in the claims. The present disclosure can be attained in various forms such as a program to function a computer as a control unit of work apparatus, a recording medium that stores this program, or as a method of storing a history information in the work apparatus. 

What is claimed is:
 1. A work apparatus comprising: a control unit configured to operate with an electric power supplied from a power supply and to perform a process for controlling an operation of the work apparatus; a volatile memory configured to retain information written therein by the control unit while the control unit operates, the information including at least history information related to the work apparatus; and, a rewritable non-volatile memory, wherein the control unit comprises an update processing unit configured to update the history information in the volatile memory every time an event, for which the history information should be updated, occurs; and, a writing processing unit configured to write the history information in the volatile memory to the non-volatile memory when the writing processing unit predicts suspension of supply of the electric power to the control unit.
 2. The work apparatus according to claim 1, wherein the control unit further comprises a restoration processing unit configured to write the history information in the non-volatile memory into the volatile memory when the control unit is activated.
 3. The work apparatus according to claim 1, wherein the writing processing unit is (i) configured to determine whether the history information in the volatile memory and the history information in the non-volatile memory differ from each other when the writing processing unit predicts the suspension of supply of the electric power; (ii) configured to write the history information in the volatile memory to the non-volatile memory when the writing processing unit determines that the history information in the volatile memory and the history information in the non-volatile memory differ from each other, and, (iii) configured not to write the history information in the volatile memory to the non-volatile memory when the writing processing unit determines that the history information in the volatile memory and the history information in the non-volatile memory do not differ from each other.
 4. The work apparatus according to claim 3, wherein the control unit further comprises a flag-setting unit configured to set a flag in the volatile memory once the update processing unit updates the history information in the volatile memory, wherein the writing processing unit is further configured to determine whether the history information in the volatile memory and the history information in the non-volatile memory differ from each other based on the flag.
 5. The work apparatus according to claim 1, wherein the work apparatus is configured so that a power supply can be coupled thereto, wherein the work apparatus further comprises a regulator configured to generate an operation voltage for operating the control unit from a power supply voltage supplied from the power supply coupled to the work apparatus, wherein the control unit is configured to operate by supply of the operation voltage, and, wherein the writing processing unit is configured to determine whether a value of the power supply voltage is smaller than or equal to a prescribed value and is configured to predict the suspension of supply of the electric power when the writing processing unit determines that the value of the power supply voltage is smaller than or equal to the prescribed value, the prescribed value being greater than a value of a minimum voltage capable of operating the control unit.
 6. The work apparatus according to claim 5 further comprising, a power-supply line configured to input the power supply voltage into the regulator, and a capacitor provided on the power supply line and configured to be charged by the power supply voltage.
 7. The work apparatus according to claim 6, wherein the control unit further comprises a power-consumption reducing unit configured to reduce an electric power consumed via the power supply line when the writing processing unit writes the history information in the volatile memory to the non-volatile memory.
 8. The work apparatus according to claim 1, wherein the work apparatus is configured to drive a fastening tool into an object, and, wherein the history information includes a count value that corresponds to driving operations of the fastening tool performed by the work apparatus.
 9. A method of rewriting history information of a work apparatus, the work apparatus comprising a control unit, a volatile memory, and a rewritable non-volatile memory, and the method comprising: reading out the history information from the non-volatile memory when the control unit is supplied with an electric power; writing the history information read out from the non-volatile memory into the volatile memory; updating the history information in the volatile memory every time an event, for which the history information should be updated, occurs while the control unit is supplied with the electric power and the control unit is in operation; and writing the history information in the volatile memory into the non-volatile memory when a suspension of supply of the electric power to the control unit is predicted. 